| Server IP : 121.121.20.254 / Your IP : 216.73.216.133 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/ |
Upload File : |
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ASCII/ANSI Conversion in Strings</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for chosen module" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
<a name="ascii"></a>
<h1 id="hd_id3147443" dir="auto">ASCII/ANSI Conversion in Strings</h1>
<p id="par_id3159201" class="paragraph" dir="auto">The following functions convert strings to and from ASCII or ANSI code.</p>
<div class="embedded">
<a name="asc"></a>
<h2 id="hd_id3150499" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03120101.html">Asc Function (BASIC)</a></h2>
<p id="par_id3151384" class="paragraph" dir="auto">Returns the ASCII (American Standard Code for Information Interchange) value of the first character in a string expression.</p>
</div>
<div class="embedded">
<a name="chr"></a>
<h2 id="hd_id3149205" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03120102.html">Chr Function</a></h2>
<p id="par_id3153311" class="paragraph" dir="auto">Returns the character that corresponds to the specified character code.</p>
</div>
<div class="embedded">
<a name="str"></a>
<h2 id="hd_id3143272" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03120103.html">Str Function</a></h2>
<p id="par_id3155100" class="paragraph" dir="auto">The <span class="literal">Str</span> function converts the contents of variables into a string. It handles numeric values, dates, strings and currency values.</p>
<p id="par_id3146958" class="paragraph" dir="auto">Positive numbers are preceded by a blank space. Negative numbers are preceded by a minus sign.</p>
<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id331641237252390" dir="auto">For numeric values the string returned by the <span class="literal">Str</span> function is locale-independent. Hence the dot is used as the decimal separator when needed.</p></div>
</div>
<br>
<p id="par_id601641237849695" class="paragraph" dir="auto">If a string is passed as argument, it is returned without any changes.</p>
<p id="par_id231641251937406" class="paragraph" dir="auto">Dates are converted into locale-dependent strings.</p>
</div>
<div class="embedded">
<a name="val"></a>
<h2 id="hd_id3149205" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03120104.html">Val Function</a></h2>
<p id="par_id3153345" class="paragraph" dir="auto">Use the <span class="literal">Val</span> function to convert a string that represents a number into numeric data type.</p>
<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id281641235880765" dir="auto">The string passed to the <span class="literal">Val</span> function is locale-independent. This means that commas are interpreted as thousands separators and a dot is used as the decimal separator.</p></div>
</div>
<br>
</div>
<div class="embedded">
<a name="cbyte"></a>
<h2 id="hd_id3156027" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03120105.html">CByte Function</a></h2>
<p id="par_id3143267" class="paragraph" dir="auto">Converts a string or a numeric expression to the <span class="literal">Byte</span> type.</p>
</div>
</div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/sbasic/shared/03120100.xhp" target="_blank">/text/sbasic/shared/03120100.xhp</a></p>
<p dir="auto">Title is: ASCII/ANSI Conversion in Strings</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>